# -*- coding: utf-8 -*-
"""
@Time    : 2024/7/24 09:38 
@Author  : ZhangShenao 
@File    : 6.使用自定义文档加载器.py 
@Desc    : 使用自定义文档加载器LineDelimiterDocumentLoader
"""
from line_delimiter_document_loader import LineDelimiterDocumentLoader

# 创建加载器对象
loader = LineDelimiterDocumentLoader(file_path='./docs/静夜思.txt')

# 逐行加载文档
for doc in loader.lazy_load():
    print(f'page_content: {doc.page_content}, metadata: {doc.metadata}')
